package com.zx.ishopping.controller.admin;

import com.zx.ishopping.DTO.UserInfoDTO;
import com.zx.ishopping.results.Result;
import com.zx.ishopping.services.UserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 管理员信息模块开发
 */

@RestController
@RequestMapping("/admin/userInfo")
@Slf4j
public class adminInfoController {

    @Autowired
    private  UserService userService;


    /**
     * 更新管理员
     * @return
     */
    @PutMapping("/updateAdmin")
    public Result updateAdminInfo(@RequestBody UserInfoDTO userInfoDTO){
        userService.update(userInfoDTO);
        return Result.success();    
    }
    
}
